#ifndef SHADEREDITOR_H
#define SHADEREDITOR_H

#include <QWidget>
#include <baseeditor.h>
#include <grouptreeitemview.h>
#include <material_editor/basematerialeditor.h>
#include <material_editor/glsltexteditor.h>
#include <materialmanager.h>
#include <ui_shadereditor.h>

class ShaderEditor : public BaseMaterialEditorWidget
{
  Q_OBJECT
private:
  Shader*           _shader;
	GLSLTextEditor*		_editor;
  GroupTreeItemView   *_groupView;

private slots:

	void UpdateGUI();
  void ContentChanged();

public:
  ShaderEditor(Shader* shader, QWidget *parent = 0);

  void SetShader (Shader* shader);
  Shader* GetShader ();

  void SetLine (int line);

public slots:
  virtual void Save ();
  virtual void Compile ();

};

#endif // SHADEREDITOR_H
